<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8"/>
	<title>商品详情页 - yumcms</title>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/main.css"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/swiper.min.css"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/colpack.css"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/quilleditor/quill.snow.css"/>
	<style>
		.standalone-container {
			width: 100%;
		}

		.snow-container {
			height: 126px;
		}
	</style>
</head>
<body>
<div class="view-content" style="padding: 0">
	<div class="view-con">
		<div class="AddProducts">
			<ul class="APList">
				<li class="active <if condition="$color_display['one'] eq 1">Act ActMain</if> Groupjump" alt="1" about="2">
					<span>基本信息</span>
					<div class="APListPre">
						<i>1</i>
					</div>
				</li>
				<li class="last active">
					<span <if condition="$color_display['two'] eq 1">style="color:#0095d4"</if>>商品详情页</span>
					<div class="APListPre" <if condition="$color_display['two'] eq 1">style="background-color: #0095d4;border: 2px solid #0095d4 !important;color: #fff !important;"</if>>
						<i>2</i>
					</div>
				</li>
			</ul>
		</div>
		<div class="AddShopping">
			<div class="PhoneTxt">
				<div class="PhoneMed">
					<div class="PMedCon">
						<div class="OverLay">
							<div class="ImgItem">

								<if condition="!empty($images_text)">
									<foreach name="images_text" item="vo" >
										<if condition="$vo['typeid'] eq 1">
											<div class="item-line1 exhibition_id">
												<foreach name="vo['images']" item="v" >
													<div class="line1-img">
														<img src="{$v['image']}">
													</div>
												</foreach>
											</div>
											<elseif condition="$vo['typeid'] eq 2"/>
												<div class="exhibition_id" id="snow-container-{$vo['num']}">{$vo['text']}</div>
											<elseif condition="$vo['typeid'] eq 3"/>
											<div class="item-line1 exhibition_id">
												<div class="item-line{$vo['class_id']}">
													<foreach name="vo['addpage_group']" item="v">
														<div class="line{$vo['class_id']}-img">
															<img src="{$v['page_img']}"/>
														</div>
													</foreach>
												</div>
											</div>
										</if>
									</foreach>
									<else />
									<div class="item-line1 exhibition_id"></div>
								</if>

							</div>
							<div class="CustomerTels" style="font-size: 16px;">售后电话： <em>{$addpage_info['as_phone']}</em></div>
						</div>
					</div>
				</div>
				<div class="PhoneContent">
					<div class="InstallList">
						<div>
							<div class="InstallBg"></div>
							<ul>
								<li class="active">图文设置</li>
							</ul>
						</div>
					</div>
					<div style="display: block" class="InstallMain InstallMainOver">
						<div class="AppendImgTxt">
							<if condition="!empty($images_text)">
								<foreach name="images_text" item="vo" key="k">
									<if condition="$vo['typeid'] eq 1">
										<div class="InstallMainS2">
											<div class="TopImg">
												<em>图片</em>最多添加9张图片，超过不能成功上传，图片大小不能超过2M
											</div>
											<div class="UploadImg image_set">
												<foreach name="vo['images']" item="v">
													<div class="StorageImg"><img src="{$v['image']}"></div>
												</foreach>
												<div alt="9" class="shareImage FilImgReas FilImgRea_{$vo['num']}" <if condition="count($vo['images']) egt 9">style="display: none;"</if>>
											</div>
											<div class="DeleteImg">删除</div>
										</div>
						</div>
								<elseif condition="$vo['typeid'] eq 2"/>
										<div class="InstallMainS2">
											<div class="standalone-container">
												<div class="snow-container snow-container-{$vo['num']}">{$vo['text']}</div>
											</div>
											<div class="DeleteImg">删除</div>
										</div>
								<elseif condition="$vo['typeid'] eq 3"/>
										<div class="InstallMainS2">
											<div class="TopImg">
												<em>聚合商品页</em>点击图片可删除已选中的商品
												<div class="bj5 edit">
													编辑
												</div>
											</div>
											<div class="ConcatSPAppendMain">
												<div class="CSPAMTxts" class_id="{$vo['class_id']}">
													<foreach name="vo['addpage_group']" item="v">
														<div class="Storagegroupdatails">
															<img src="{$v['page_img']}" alt="{$v['addpage_info_id']}">
														</div>
													</foreach>
												</div>
												<div style="clear: both;">
												</div>
											</div>
											<div class="DeleteImg">
												删除
											</div>
										</div>
								</if>
								</foreach>
						<else />
						<div class="InstallMainS2">
							<div class="TopImg">
								<em>图片</em>最多添加9张图片，超过不能成功上传，图片大小不能超过2M
							</div>
							<div class="UploadImg">
								<div alt="9" class="shareImage FilImgReas FilImgRea_0">
								</div>
								<div class="DeleteImg">删除</div>
							</div>
						</div>
						</if>
					</div>
					<div class="AppendIT">
						<div class="ConcatCmp" alt="<if condition="!empty($group_num)">{$group_num}<else />1</if>">添加商品页</div>
						<div class="ConcatImg" alt="<if condition="!empty($img_num)">{$img_num}<else />1</if>">添加图片</div>
						<div class="ConcatTxt" alt="<if condition="!empty($text_num)">{$text_num}<else />1</if>">添加文字</div>
					</div>
					</div>
				</div>
				<div class="ThreeBtns">
					<input type="hidden" value="{$id}" name="id"/>
					<button type="button" class="BtnOne" alt="0" lang="0">保存</button>
					<button type="button" class="BtnTwo" alt="0" lang="2">预览</button>
					<button type="button" class="BtnOne" alt="1" lang="1">发布</button>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="GetTogether">
	<div class="GetTogetherPre">
		<div class="GetTogetherTxt">编辑聚合商品页</div>
		<div class="Getclose"></div>
		<div class="REWarning">您已发布<em>{:count($group_info)}</em>个商品详情页，系统只拉取最近发布的200个详情页</div>
		<div class="GetTogetherCon">
			<div class="ResetStyle">
				<span class="span1">选择样式</span>
				<ul>
					<li>
						<i class="active" alt="1"></i>
						<dl>
							<dt class="m1"></dt>
							<dd>单列样式</dd>
							<div class="ProblemTxtMedLine">
								<div class="PTMConUp"></div>
								推荐每张图片的分辨率为：1044×556px，效果更佳哦。
							</div>
						</dl>
					</li>
					<li>
						<i alt="2"></i>
						<dl>
							<dt class="m2"></dt>
							<dd>双列样式</dd>
							<div class="ProblemTxtMedLine">
								<div class="PTMConUp"></div>
								推荐每张图片的分辨率为：512×556px，效果更佳哦。
							</div>
						</dl>
					</li>
					<li>
						<i alt="3"></i>
						<dl>
							<dt class="m3"></dt>
							<dd>三列样式</dd>
							<div class="ProblemTxtMedLine">
								<div class="PTMConUp"></div>
								推荐每张图片的分辨率为：334×360px，效果更佳哦。
							</div>
						</dl>
					</li>
				</ul>
			</div>
			<div class="ResetBook">
				<span class="span1">选择页面</span>
			</div>
			<form>
				<div class="ResetNumber">
					<span class="lf">已选择 <em class="rad" id="chosen">0</em> 个页面，还可再选择 <em class="rad" id="total_page" alt="{:count($group_info)}">{:count($group_info)}</em> 个页面</span>
					<div class="rt">
						<label>
							<input type="text" placeholder="输入页面名称搜索页面" name="keyword" value=""/>
						</label>
					</div>
					<button type="button" class="RNBtns" id="search"></button>
				</div>
			</form>
			<div class="ResetImgList">
				<foreach name="group_info" item="vo">
					<div class="ResetImgListCon">
						<i alt="{$vo['id']}"></i>
						<img src="{$vo['page_img']}"/>
						<div class="pic-document">{$vo['page_name']}</div>
					</div>

				</foreach>
			</div>
			<div class="BookNameBtns">
				<div class="AppendBtns">
					<button type="button" class="RNClose">取消</button>
					<button type="button" class="RNTxt" alt="0" typeid="1" list="0">保存</button>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="TxtBack">
	<div class="TxtBackBg"></div>
	<div class="TxtBackPre">
		<div class="TBTop">
			<span class="lf">提示</span>
			<i class="TBClose"></i>
		</div>
		<div class="TBText">发布后不能修改，确认发布？</div>
		<div class="TBYn">
			<div class="TBNo">取消</div>
			<div class="TBYes">确定</div>
		</div>
	</div>
</div>
<div class="tipsSave">
	<div class="saveTip">
		<div class="h3">提示</div>
		<div class="close"></div>
		<div class="saveContent">
			<p>请先保存当前页面信息</p>
		</div>
		<div class="saveBtns">
			<button type="button" class="saveTo">确定</button>
		</div>
	</div>
</div>
<script src="__PUBLIC__/Admin/js/jquery-1.12.4.js"></script>
<script src="__PUBLIC__/Admin/js/swiper.min.js"></script>
<script src="__PUBLIC__/Admin/js/colpack.js"></script>
<script src="__PUBLIC__/Admin/js/main.js?v={:time()}"></script>
<script src="__PUBLIC__/Admin/js/uploadify/jquery.Huploadify.js"></script>
<script src="__PUBLIC__/Admin/quilleditor/quill.min.js?v={:time()}"></script>
<script src="__PUBLIC__/Admin/js/groupdetails.js?v={:time()}"></script>

<script type="text/javascript">
	//上传图片
	function upload_images(class_name){

		$('.'+class_name).Huploadify({
			buttonText: '请选择上传',
			auto: true,
			method: 'post',
			fileTypeExts: '*.jpg;*.png;*.gif;*.jpeg:*.JPG;*.PNG;*.GIF;*.JPEG',
			multi: true,
			simUploadLimit:6,
			formData: {key: 123456, key2: 'news'}, //banner是图片存放的目录
			fileSizeLimit: 2048,
			itemTemplate: '',//进度条，若显示进度条用 'itemTemp'
			showUploadedPercent: true,//是否实时显示上传的百分比，如20%
			showUploadedSize: true,
			removeTimeout: 1000,
			uploader: "/Admin/AddPage/UpdateImage",
			onUploadSuccess: function (file, data) {
				var items = JSON.parse(data);

				if(items.code == 200){
					var _imgstr = items.msg;
					var storageimg =
							'<div class="StorageImg">' +
							'<img src="' + _imgstr + '"/>' +
							'</div>'

					$('.'+class_name).before(storageimg);
					$('.'+class_name).stop().show();

					total = $('.'+class_name).parents(".UploadImg").find(".StorageImg").length;

					var total_element = $('.'+class_name).parents(".InstallMainS2").index();

					var html = '<div class="line1-img">';
					html += '<img src="' + _imgstr + '">';
					html += '</div>';

					$(".exhibition_id").eq(total_element).append(html);

					if(total >= 9){
						$('.'+class_name).stop().hide();
					}

				}else{
					$(".saveContent").find("p").html(list.msg);
					$('.tipsSave').stop().fadeIn();
					$('.saveTip').stop().animate({
						top: '37' + '%',
						opacity: '1'
					}, 300);
				}
			},
		});

	}

	<if condition="!empty($images_text)">
		<foreach name="images_text" item="vo" key="k">
			<if condition="$vo['typeid'] eq 1">
			upload_images("FilImgRea_{$vo['num']}");
			<elseif condition="$vo['typeid'] eq 2"/>
			new Quill(".snow-container-{$vo['num']}", {placeholder: '请输入...', theme: 'snow'});
			</if>
		</foreach>
	<else />
	upload_images("FilImgRea_0");
	</if>
</script>
</body>
</html>